<?php

use common\components\wtools\tools\ArrayHelper;
use kartik\detail\DetailView;
use yii\helpers\Html;

/* @var $this yii\web\View */
/* @var $model admin\modules\system\models\forms\Banners */
?>
<div class="banners-_detail-view">

    <?= DetailView::widget([
        'model' => $model,
        'condensed' => true,
        'hover' => true,
        'enableEditMode' => false,
        'panel' => [
            'heading' => "详细",
            'type' => DetailView::TYPE_INFO,
        ],
        'attributes' => [
            'id',
            'title',
//            'status',
            [
                'attribute' => 'status',
                'value' => function () use ($model) {
                    return $model::getStatusDesc()[$model->status];
                },
                'format' => 'raw',
            ],
            'banner_sort',
//            'url:url',
            [
                'attribute' => 'url',
                'value' => function () use ($model) {
                    return Html::img($model->url, ['class' => 'img-responsive']);
                },
                'format' => 'raw',
            ],
            'created_at:datetime',
            'updated_at:datetime',
        ],
    ]) ?>

</div>
